package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

@Mapper
public interface UserInfoMapper extends BaseMapper<UserInfo> {
    @Insert("insert into tb_user_info(id, gender, nickname, birthday, city) value (#{id}, #{gender}, #{nickname}, #{birthday}, #{city})")
    void saveUserInfo(UserInfo userInfo);

    @Select("select * from tb_user_info where id = #{jid}")
    UserInfo getUserInfoById(Long jid);
}
